<?php
/**
 * @package		Joomla.Site
 * @subpackage	com_content
 * @copyright	Copyright (C) 2005 - 2012 Open Source Matters, Inc. All rights reserved.
 * @license		GNU General Public License version 2 or later; see LICENSE.txt
 */

// no direct access
defined('_JEXEC') or die;

JHtml::addIncludePath(JPATH_COMPONENT . '/helpers');

// Create shortcuts to some parameters.
$params		= $this->item->params;
$images = json_decode($this->item->images);
$urls = json_decode($this->item->urls);
$canEdit	= $this->item->params->get('access-edit');
$user		= JFactory::getUser();

$categories = JCategories::getInstance('Content');
$category = $categories->get($this->item->catid);
//echo $this->item->catid;

preg_match_all( '/\<img(.*?)src\=\"(.*?)\"(.*?)\>/', $this->item->text, $images );
//var_dump($category);
$cat_para = json_decode($category->params);
//var_dump($cat_para);

$this->item->text = preg_replace('/\<img(.*?)src\=\"(.*?)\"(.*?)\>/', '', $this->item->text);

$this->item->text = preg_replace('/\<p\>\<\/p\>/', '', $this->item->text);

$images = $images[2];



?>





<!--Banner-->
			<div id="banner" class="w455 fl mr15">
				<div id="product-content" class="banner-content por">
					<div style="width:453px;height: 457px">
						<img id="main-pimage" style="max-width:453px;max-height: 457px;margin:0 auto;display:block" src="<?php echo JURI::base().$images[0] ?>" />
					</div>
					<div>
						<ul class="product-list">
						    <?php foreach($images as $image) { ?>
							<li onclick="$('#main-pimage').attr('src', '<?php echo JURI::base().$image ?>');" style="width:108px;height: 104px"><a href="#ci"><img style="max-width:108px;max-height: 104px" src="<?php echo JURI::base().$image ?>"/></a></li>							
						    <?php } ?>
						</ul>
					</div>
				</div>
			<!--end banner-->
			</div>
			<div id="container" class="w455 taj fr ofh por">
				<div class="logo-product poa">
					<img src="<?php echo JURI::base().$cat_para->image ?>" />
				</div>
				<h3><?php echo $this->escape($this->item->title); ?></h3>
				<br/>
				<?php echo $this->item->text; ?>
				<a href="<?php echo JURI::base()."product-enquiry" ?>" class="buy-now">Enquiry</a>
			</div>
















